package com.smartticket.jeju.repository;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.stereotype.Repository;

import com.smartticket.jeju.model.Sight;

public class SightRepositoryImpl implements SightRepository 
{
	@Autowired
	private JdbcDaoSupport jdbcDaoSupport;
	
	@Autowired
	@Qualifier("sightRowMapper")
	private RowMapper<Sight> rowMapper;

	public Sight findById(int id) 
	{
		String query = "select * from sights where id = ?";
		return jdbcDaoSupport.getJdbcTemplate().queryForObject(query, rowMapper, id);
	}

	public String getSightName(int sight_id) {
		// TODO Auto-generated method stub
		return null;
	}

}
